package com.shuda.business.channel.service;

import com.shuda.business.channel.entity.FinancialClue;
import com.shuda.business.channel.mapper.FinancialClueMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FinancialClueDbService {
    
    @Autowired
    private FinancialClueMapper financialClueMapper;
    
    public FinancialClue getById(Long id) {
        return financialClueMapper.selectById(id);
    }
    
    public List<FinancialClue> getList() {
        return financialClueMapper.selectList(null);
    }
    
    public boolean insert(FinancialClue financialClue) {
        return financialClueMapper.insert(financialClue) > 0;
    }
    
    public boolean update(FinancialClue financialClue) {
        return financialClueMapper.updateById(financialClue) > 0;
    }
    
    public boolean delete(Long id) {
        return financialClueMapper.deleteById(id) > 0;
    }
}